<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>HUI </title>
<link rel="stylesheet" type="text/css" href="css/hui.css" />

</head>
<body>
<div class="hui-wrap">
  	<div class="hui-swipe" id="swipe1">
  		<div class="hui-swipe-item"><img src="image/1.jpg"/></div>
	    <div class="hui-swipe-item"><img src="image/2.jpg"/></div>
	    <div class="hui-swipe-item"><img src="image/3.jpg"/></div>
	</div>
	
	<div style="padding:10px 20px 10px 5px;width: 100%;" id="btnList1" align="center">
        <div class="hui-button hui-fl" style="height: 80px;width: 23%;" onclick="celue()">  
  			<p style="text-align: center;margin-top: 2px;height: 48px;"><img src="image/fbcl.png" /></p> 
  			<p style="word-break:keep-all;white-space:nowrap;">发布策略</p> 
        </div>   
        <div class="hui-button hui-fl" style="margin-left:5px;height: 80px;width: 23%;" onclick="chongzhi()">
        	<p style="text-align: center;margin-top: 2px;height: 48px;"><img src="image/cz.png" /></p> 
  			<p style="word-break:keep-all;white-space:nowrap;">充值中心</p> 
        </div>
        <div class="hui-button hui-fl" style="margin-left:5px;height: 80px;width: 23%; " onclick="top20()">
        	<p style="text-align: center;margin-top: 2px;height: 48px;"><img src="image/gpph.png" /></p> 
  			<p style="word-break:keep-all;white-space:nowrap;">牛股排行</p> 
        </div>
        <div class="hui-button hui-fl" style="margin-left:5px;height: 80px;width: 23%;">
        	<p style="text-align: center;margin-top: 2px;height: 48px;"><img src="image/cjwt.png" /></p>
  			<p style="word-break:keep-all;white-space:nowrap;">常见问题</p> 
        </div>
    </div>
	<div style="background-color: gainsboro;height: 95px;font-family:"hui-font";">
	<div class="hui-fl" style="background-color: white;width: 48.5%;height: 85px;margin-left: 1%;margin-top: 5px;">
		<div style="text-align: center; margin-top: 10px;">上证指数</div>
		<div id="shzs" style="text-align: center;font-size: 28px;"></div>
		<div id="sh1" style="margin-left: 10px;float: left;" >111</div>
		<div id="sh2" style="float:right;margin-right: 10px;">111</div>
	</div>
	<div class="hui-fl" style="background-color: white;width: 48.5%;height: 85px;margin-left: 1%;margin-top: 5px">
		<div style="text-align: center; margin-top: 10px;">深证指数</div>
		<div id="szzs" style="text-align: center;font-size: 28px;"></div>
		<div id="sz1" style="margin-left: 10px;float: left;" ></div>
		<div id="sz2" style="float:right;margin-right: 10px;"></div>
	</div>
	</div>
	<div class="hui-tab">
            <div class="hui-tab-title">
                <div>最新动态</div>
                <div>最牛达人</div>
                <div>最优策略</div>
            </div>
            <div class="hui-tab-body">
                <div class="hui-tab-item hui-list">
                    <ul>
                        <li>购买动态</li>
                        <li>购买动态</li>
                        <li>购买动态</li>
                        <li>购买动态</li>
                        <li>购买动态</li>
                    </ul>
                </div>
                <div class="hui-tab-item hui-list">
                    <ul>
                        <li>胜率排行</li>
                        <li>胜率排行</li>
                        <li>胜率排行</li>
                        <li>胜率排行</li>
                        <li>胜率排行”</li>
                    </ul>
                </div>
                <div class="hui-tab-item hui-list">
                    <ul>
                        <li>涨幅最高策略</li>
                        <li>涨幅最高策略</li>
                        <li>涨幅最高策略</li>
                        <li>涨幅最高策略</li>
                        <li>涨幅最高策略</li>
                    </ul>
                </div>
            </div>
        </div>
</div>
<div id="hui-footer">
    <a href="javascript:hui.open('index.html');" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:zixuan();" id="nav-news">
        <div class="hui-footer-icons hui-icons-picker"></div>
        <div class="hui-footer-text">选股</div>
    </a>
    <a href="javascript:celue();" id="nav-news">
        <div class="hui-footer-icons hui-icons-water-fall"></div>
        <div class="hui-footer-text">策略</div>
    </a>
    <a href="javascript:xiaoxi();" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">消息</div>
    </a>
    <a href="javascript:wode();" id="nav-my">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<script type="text/javascript" src="js/hui.js"></script>
<script type="text/javascript" src="js/hui-swipe.js"></script>
<script type="text/javascript" src="js/hui-tab.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
	
	function sswr(num){ 
	var aNew; 
		var re = /([0-9]+\.[0-9]{2})[0-9]*/; 
		aNew = num.replace(re,"$1"); 
		return aNew; 
	} 
	
		var swipe1 = new huiSwpie('#swipe1');
		swipe1.autoPlay=false;
        swipe1.run();
        hui.tab('.hui-tab');
		$.ajax({
	    url:"http://hq.sinajs.cn/list=s_sh000001,sz399001",
	    dataType:"script",
	    cache:"false",
	    type:"GET",
	    success:function(a){
        var sh = hq_str_s_sh000001;
        var shsz = sh.split(",");
        $("#shzs").html(sswr(shsz[1]));
        $("#sh1").html(sswr(shsz[2]));
        $("#sh2").html(sswr(shsz[3])+"%");
        var sz = hq_str_sz399001;
        var szsz = sz.split(",");
        $("#szzs").html(sswr(szsz[1]));
        var hehe = szsz[3] - szsz[2];
        $("#sz1").html(hehe.toFixed(2));
        var caca = hehe / szsz[2];
        $("#sz2").html((caca.toFixed(2))+"%");
        }
    });
    
    
    function checkLogin(){
    	var nowUser = localStorage.getItem("nowUser");
    	if(nowUser==null){
    		hui.open('login.html');
    	}else{
    		return true;
    	}
    }
    
    function chongzhi(){
    	if(checkLogin()){
    		hui.toast("chongzh");
    	}
    	
    	
    }
    function celue(){
    	if(checkLogin()){
    		hui.open('celue.html?_='+new Date().getTime());
    	}
    	
    	
    }
    function zixuan(){
    	if(checkLogin()){
    		hui.open('zixuan.html');
    	}
    }
    function xiaoxi(){
    	if(checkLogin()){
    		hui.open('msg.html');
    	}
    }
    function wode(){
    	if(checkLogin()){
    		hui.open('yonghu.html?_='+new Date().getTime());
    	}
    }
    function top20(){
    	hui.open('top.html?_='+new Date().getTime());
    }
</script>
</body>
</html>